
        /* CSS Variables for Theme Management */
        :root {
            --primary-blue: #0f3057;
            --secondary-blue: #168aad;
            --gold: #d4af37;
            --gold-hover: #aa8436;
            --accent-glow: rgba(212, 175, 55, 0.3);
            --bg-light: #f8f9fa;
            --bg-card-light: rgba(255, 255, 255, 0.9);
            --text-dark: #1e293b;
            --text-muted: #64748b;
            --border-light: rgba(15, 48, 87, 0.08);
            
            /* Dark Mode Variables */
            --bg-dark-base: #0f172a;
            --bg-card-dark: rgba(30, 41, 59, 0.9);
            --text-light: #f1f5f9;
            --text-muted-dark: #94a3b8;
            --border-dark: rgba(255, 255, 255, 0.08);

            /* Dynamic Pointers */
            --dynamic-bg: var(--bg-light);
            --dynamic-card-bg: var(--bg-card-light);
            --dynamic-text: var(--text-dark);
            --dynamic-text-muted: var(--text-muted);
            --dynamic-border: var(--border-light);
            --glass-blur: blur(16px);
            --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
            --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.12);
            
            /* Smooth Cinematic Transitions */
            --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            --transition-bounce: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        /* Dark Mode Override Class */
        body.dark-theme {
            --dynamic-bg: var(--bg-dark-base);
            --dynamic-card-bg: var(--bg-card-dark);
            --dynamic-text: var(--text-light);
            --dynamic-text-muted: var(--text-muted-dark);
            --dynamic-border: var(--border-dark);
            color-scheme: dark;
        }

        /* Basic Resets */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
            overflow-x: hidden;
            width: 100%;
            max-width: 100%;
        }

        body {
            background-color: var(--dynamic-bg);
            color: var(--dynamic-text);
            font-family: 'Poppins', 'Noto Nastaliq Urdu', sans-serif;
            text-align: right;
            transition: var(--transition-smooth);
            overflow-x: hidden;
            width: 100%;
            max-width: 100%;
            line-height: 1.8;
        }

        h1, h2, h3, h4, .brand-font {
            font-family: 'Cinzel', 'Noto Nastaliq Urdu', serif;
            letter-spacing: 0.5px;
        }

        /* Loading Overlay */
        #preloader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--primary-blue);
            z-index: 9999;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            transition: opacity 0.4s ease, visibility 0.4s ease;
        }
        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(255,255,255,0.1);
            border-top: 5px solid var(--gold);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        .preloader-text {
            color: white;
            margin-top: 15px;
            font-family: 'Cinzel', 'Noto Nastaliq Urdu', serif;
            letter-spacing: 2px;
            font-size: 0.9rem;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Container Layouts */
        .container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 60px 0;
        }

        /* Announcement Ticker with RTL support */
        .announcement-bar {
            background: linear-gradient(90deg, var(--primary-blue), #1a4d80);
            color: white;
            padding: 10px 0;
            font-size: 0.85rem;
            border-bottom: 2px solid var(--gold);
            overflow: hidden;
            white-space: nowrap;
            position: relative;
            z-index: 101;
        }
        .ticker-wrapper {
            display: flex;
            align-items: center;
        }
        .ticker-title {
            background: var(--gold);
            color: var(--primary-blue);
            padding: 2px 10px;
            font-weight: bold;
            border-radius: 3px;
            margin-left: 15px;
            z-index: 2;
            position: relative;
            font-family: 'Poppins', 'Noto Nastaliq Urdu', sans-serif;
            font-size: 0.75rem;
            text-transform: uppercase;
        }
        .ticker-content {
            display: inline-block;
            animation: ticker 25s linear infinite;
            animation-delay: 2s; /* Delayed action start by 2 seconds */
            animation-fill-mode: backwards;
        }
        .ticker-content a {
            color: white;
            text-decoration: none;
            margin-left: 50px;
            transition: var(--transition-smooth);
            cursor: pointer;
        }
        .ticker-content a:hover {
            color: var(--gold);
            text-decoration: underline;
        }
        @keyframes ticker {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        /* Sticky Navigation Bar */
        .navbar {
            position: sticky;
            top: 0;
            z-index: 100;
            background: var(--dynamic-card-bg);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border-bottom: 1px solid var(--dynamic-border);
            padding: 15px 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: var(--shadow-sm);
            transition: var(--transition-smooth);
        }
        .navbar.scrolled {
            padding: 10px 5%;
            box-shadow: var(--shadow-md);
        }
        .logo-area {
            display: flex;
            align-items: center;
            text-decoration: none;
            color: inherit;
        }
        .logo-icon {
            background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
            color: var(--gold);
            width: 45px;
            height: 45px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            margin-left: 12px;
            border: 2px solid var(--gold);
            font-size: 1.2rem;
            box-shadow: var(--shadow-sm);
        }
        .logo-text h1 {
            font-size: 1.2rem;
            font-weight: bold;
            color: var(--primary-blue);
            line-height: 1.2;
        }
        body.dark-theme .logo-text h1 {
            color: white;
        }
        .logo-text span {
            font-size: 0.7rem;
            display: block;
            color: var(--gold);
            letter-spacing: 1px;
            text-transform: uppercase;
            font-weight: 600;
        }
        
        /* PC Nav Links */
        .nav-links {
            display: flex;
            align-items: center;
            list-style: none;
            gap: 25px;
        }
        .nav-links a {
            text-decoration: none;
            color: var(--dynamic-text);
            font-weight: 600;
            font-size: 0.9rem;
            transition: var(--transition-smooth);
            position: relative;
            padding: 5px 0;
        }
        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 0;
            height: 2px;
            background-color: var(--gold);
            transition: var(--transition-smooth);
            transform: translateX(-50%);
        }
        .nav-links a:hover {
            color: var(--secondary-blue);
        }
        .nav-links a:hover::after {
            width: 100%;
        }
        
        .nav-actions {
            display: flex;
            align-items: center;
            gap: 18px;
        }
        
        /* Smooth Interactive Buttons */
        .theme-toggle-btn, .profile-btn {
            background: none;
            border: none;
            color: var(--dynamic-text);
            cursor: pointer;
            font-size: 1.25rem;
            transition: var(--transition-bounce);
            padding: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
        }
        .menu-btn {
            background: none;
            border: none;
            color: var(--dynamic-text);
            cursor: pointer;
            font-size: 1.25rem;
            transition: var(--transition-bounce);
            padding: 6px;
            display: none; /* Desktop view hides the Menu icon */
            align-items: center;
            justify-content: center;
        }
        .theme-toggle-btn:hover, .profile-btn:hover, .menu-btn:hover {
            color: var(--gold);
            transform: scale(1.15);
        }
        .profile-btn {
            position: relative;
        }

        /* Language Selector Styling */
        .lang-selector {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.85rem;
            font-weight: bold;
        }
        .lang-link {
            text-decoration: none;
            color: var(--dynamic-text);
            opacity: 0.6;
            transition: var(--transition-smooth);
        }
        .lang-link.active, .lang-link:hover {
            color: var(--gold);
            opacity: 1;
        }
        .lang-separator {
            color: var(--dynamic-border);
        }

        /* Hero Section Styling (Highly Optimized for Mobile) */
        .hero {
            position: relative;
            min-height: 75vh;
            background: linear-gradient(rgba(15, 48, 87, 0.85), rgba(15, 48, 87, 0.95)), #0f3057;
            display: flex;
            align-items: center;
            color: white;
            padding: 60px 5% 120px 5%;
        }
        .hero-content {
            max-width: 800px;
            position: relative;
            z-index: 5;
        }
        .hero-badge {
            background: rgba(212, 175, 55, 0.2);
            border-right: 4px solid var(--gold);
            padding: 8px 15px;
            display: inline-block;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            margin-bottom: 25px;
            border-radius: 4px 0 0 4px;
        }
        .hero h2 {
            font-size: 3rem;
            font-weight: 700;
            line-height: 1.4;
            margin-bottom: 20px;
            color: #ffffff;
            text-shadow: 0 4px 10px rgba(0,0,0,0.3);
        }
        .hero p {
            font-size: 1.1rem;
            margin-bottom: 35px;
            color: rgba(255, 255, 255, 0.9);
            max-width: 600px;
        }
        .hero-btns {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }
        .btn {
            padding: 12px 30px;
            border-radius: 30px;
            font-weight: 600;
            text-decoration: none;
            transition: var(--transition-bounce);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 0.95rem;
        }
        .btn-gold {
            background: var(--gold);
            color: var(--primary-blue);
            border: 2px solid var(--gold);
            box-shadow: 0 0 15px var(--accent-glow);
        }
        .btn-gold:hover {
            background: var(--gold-hover);
            border-color: var(--gold-hover);
            color: white;
            transform: translateY(-4px);
            box-shadow: 0 8px 25px rgba(212,175,55,0.4);
        }
        .btn-outline {
            background: transparent;
            color: white;
            border: 2px solid white;
        }
        .btn-outline:hover {
            background: white;
            color: var(--primary-blue);
            transform: translateY(-4px);
        }

        /* Floating Statistics Alignment */
        .stats-wrapper {
            position: absolute;
            bottom: -50px;
            left: 5%;
            right: 5%;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            z-index: 10;
        }
        .stat-card {
            background: var(--dynamic-card-bg);
            border: 1px solid var(--dynamic-border);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            box-shadow: var(--shadow-lg);
            transition: var(--transition-smooth);
        }
        .stat-card:hover {
            transform: translateY(-6px);
            border-color: var(--gold);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        }
        .stat-num {
            font-size: 2rem;
            font-weight: 700;
            color: var(--secondary-blue);
            margin-bottom: 5px;
            font-family: 'Poppins', sans-serif;
        }
        body.dark-theme .stat-num {
            color: var(--gold);
        }
        .stat-label {
            font-size: 0.8rem;
            color: var(--dynamic-text-muted);
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 1px;
        }

        /* Common Section Layouts */
        .section-header {
            text-align: center;
            max-width: 600px;
            margin: 0 auto 50px auto;
        }
        .section-tag {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: var(--gold);
            font-weight: 600;
            margin-bottom: 10px;
            display: block;
        }
        .section-title {
            font-size: 2rem;
            color: var(--primary-blue);
            margin-bottom: 15px;
        }
        body.dark-theme .section-title {
            color: white;
        }
        .section-desc {
            color: var(--dynamic-text-muted);
            font-size: 0.95rem;
        }

        /* Wave Divider Elements */
        .divider-wave {
            position: relative;
            width: 100%;
            line-height: 0;
            z-index: 1;
        }
        .divider-wave svg {
            width: 100%;
            height: 40px;
            fill: var(--dynamic-bg);
        }

        /* Safe & Fast Scroll Reveals */
        .reveal {
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }
        body.js-loaded .reveal {
            opacity: 0;
            transform: translateY(30px);
        }
        body.js-loaded .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        /* About Section */
        #about {
            padding-top: 100px;
        }
        .about-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            align-items: center;
            margin-bottom: 60px;
        }
        .about-image {
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: var(--shadow-lg);
            min-height: 250px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(15, 48, 87, 0.05);
            border: 1px dashed var(--dynamic-border);
        }
        .about-image img {
            width: 100%;
            display: block;
            border-radius: 12px;
            transition: var(--transition-smooth);
        }
        .about-image:hover img {
            transform: scale(1.03);
        }
        .about-badge {
            position: absolute;
            bottom: 20px;
            left: 20px;
            background: var(--gold);
            color: var(--primary-blue);
            padding: 12px 20px;
            border-radius: 8px;
            font-weight: bold;
            box-shadow: var(--shadow-md);
        }
        .about-badge p {
            font-size: 1.3rem;
            line-height: 1;
        }
        .about-badge span {
            font-size: 0.7rem;
            text-transform: uppercase;
        }
        .about-content h3 {
            font-size: 1.6rem;
            color: var(--primary-blue);
            margin-bottom: 20px;
        }
        body.dark-theme .about-content h3 {
            color: white;
        }
        .about-content p {
            color: var(--dynamic-text-muted);
            margin-bottom: 20px;
            font-size: 0.95rem;
        }
        .mission-vision-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }
        .card-glass {
            background: var(--dynamic-card-bg);
            border: 1px solid var(--dynamic-border);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            padding: 25px;
            border-radius: 12px;
            box-shadow: var(--shadow-sm);
            transition: var(--transition-smooth);
        }
        .card-glass:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-md);
            border-color: rgba(212, 175, 55, 0.4);
        }
        .card-glass h4 {
            font-size: 1.05rem;
            color: var(--primary-blue);
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        body.dark-theme .card-glass h4 {
            color: var(--gold);
        }
        .card-glass p {
            font-size: 0.85rem;
            color: var(--dynamic-text-muted);
            margin: 0;
        }

        /* 14 Custom Features grid */
        .features-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-top: 40px;
        }
        .feature-card {
            text-align: right;
            padding: 22px;
            border-radius: 12px;
        }
        .feature-icon {
            background: rgba(22, 138, 173, 0.1);
            color: var(--secondary-blue);
            width: 42px;
            height: 42px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            margin-bottom: 15px;
            transition: var(--transition-bounce);
        }
        .feature-card:hover .feature-icon {
            background: var(--secondary-blue);
            color: white;
            transform: rotateY(180deg);
        }
        .feature-card h4 {
            font-family: 'Poppins', 'Noto Nastaliq Urdu', sans-serif;
            font-weight: 600;
            font-size: 0.95rem;
            margin-bottom: 8px;
            color: var(--primary-blue);
        }
        body.dark-theme .feature-card h4 {
            color: var(--gold);
        }

        /* Principal Message Section RTL adjust */
        .principal-section {
            background: linear-gradient(135deg, rgba(15, 48, 87, 0.03), rgba(22, 138, 173, 0.03));
            padding: 80px 0;
            border-top: 1px solid var(--dynamic-border);
            border-bottom: 1px solid var(--dynamic-border);
        }
        .principal-grid {
            display: grid;
            grid-template-columns: 1fr 1.8fr;
            gap: 50px;
            align-items: center;
        }
        .principal-img-frame {
            position: relative;
            border-radius: 12px;
            padding: 10px;
            background: var(--dynamic-card-bg);
            border: 1px solid var(--dynamic-border);
            box-shadow: var(--shadow-lg);
            min-height: 250px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .principal-img-frame img {
            width: 100%;
            height: auto;
            border-radius: 8px;
            display: block;
        }
        .quote-icon-decor {
            position: absolute;
            top: -15px;
            right: -15px;
            background: var(--gold);
            color: white;
            width: 45px;
            height: 45px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            box-shadow: var(--shadow-md);
            z-index: 10;
        }
        .principal-msg-card {
            background: var(--dynamic-card-bg);
            border-right: 5px solid var(--gold);
            border-left: none;
            padding: 40px;
            border-radius: 12px 0 0 12px;
            box-shadow: var(--shadow-md);
        }
        .principal-msg-card blockquote {
            font-size: 1.05rem;
            font-style: italic;
            color: var(--dynamic-text);
            margin-bottom: 25px;
            line-height: 1.8;
        }
        .principal-signature h5 {
            font-family: 'Cinzel', 'Noto Nastaliq Urdu', serif;
            font-size: 1.2rem;
            color: var(--primary-blue);
            margin-bottom: 5px;
        }
        body.dark-theme .principal-signature h5 {
            color: white;
        }
        .principal-signature p {
            font-size: 0.8rem;
            color: var(--gold);
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 1px;
        }

        /* Teachers Grid */
        .teachers-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 25px;
        }
        .teacher-card {
            background: var(--dynamic-card-bg);
            border: 1px solid var(--dynamic-border);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: var(--shadow-sm);
            transition: var(--transition-smooth);
        }
        .teacher-card:hover {
            transform: translateY(-6px);
            box-shadow: var(--shadow-lg);
            border-color: var(--gold);
        }
        .teacher-img {
            height: 240px;
            overflow: hidden;
            position: relative;
            background: rgba(15, 48, 87, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .teacher-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition-smooth);
        }
        .teacher-card:hover .teacher-img img {
            transform: scale(1.06);
        }
        .teacher-info {
            padding: 20px;
            text-align: center;
        }
        .teacher-info h4 {
            font-size: 0.95rem;
            color: var(--primary-blue);
            margin-bottom: 5px;
        }
        body.dark-theme .teacher-info h4 {
            color: white;
        }
        .teacher-subject {
            font-size: 0.75rem;
            color: var(--gold);
            font-weight: 600;
            margin-bottom: 10px;
            text-transform: uppercase;
        }
        .teacher-qual {
            font-size: 0.75rem;
            color: var(--dynamic-text-muted);
            margin-bottom: 5px;
        }

        /* Results Combined Section Layout */
        .results-container {
            display: grid;
            grid-template-columns: 1.2fr 1fr;
            gap: 40px;
            align-items: flex-start;
            width: 100%;
            max-width: 100%;
            overflow: hidden;
        }
        .results-container > * {
            min-width: 0;
            width: 100%;
        }
        .toppers-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            width: 100%;
        }
        .toppers-grid > * {
            min-width: 0;
        }
        .topper-card {
            text-align: center;
            padding: 20px 10px;
            position: relative;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }
        .topper-badge {
            position: absolute;
            top: 10px;
            left: 10px;
            background: var(--gold);
            color: white;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            font-size: 0.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }
        .topper-img {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            margin: 0 auto 10px auto;
            border: 3px solid var(--gold);
            overflow: hidden;
            background: rgba(15, 48, 87, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .topper-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .topper-name {
            font-size: 0.85rem;
            font-weight: bold;
            color: var(--primary-blue);
        }
        body.dark-theme .topper-name {
            color: white;
        }
        .topper-percentage {
            font-size: 0.8rem;
            color: var(--secondary-blue);
            font-weight: 600;
        }
        .topper-class {
            font-size: 0.7rem;
            color: var(--dynamic-text-muted);
        }
        .topper-marks {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--gold-hover);
        }

        /* Search Box / Ticker Wrapper */
        .search-results-box {
            padding: 30px;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }
        
        /* Ticker Row styling for uniform vertical slide */
        .ticker-row {
            height: 64px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
            border-bottom: 1px solid var(--dynamic-border);
            box-sizing: border-box;
            background: var(--dynamic-card-bg);
            transition: var(--transition-smooth);
        }
        
        /* Table responsive wrapper constraint */
        .table-container {
            overflow-x: auto;
            width: 100%;
            display: block;
            -webkit-overflow-scrolling: touch;
            margin-top: 15px;
            max-width: 100%;
        }
        .result-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.8rem;
            text-align: right;
            min-width: 400px;
        }
        .result-table th {
            background: var(--primary-blue);
            color: white;
            padding: 10px;
            font-weight: 500;
        }
        .result-table td {
            padding: 10px;
            border-bottom: 1px solid var(--dynamic-border);
            color: var(--dynamic-text);
        }
        .status-badge {
            background: rgba(46, 117, 89, 0.15);
            color: #2e7559;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        /* Fee Submission Styles */
        .fee-section {
            background: linear-gradient(135deg, rgba(22, 138, 173, 0.02), rgba(212, 175, 55, 0.02));
            padding: 80px 0;
        }
        .fee-grid {
            display: grid;
            grid-template-columns: 1.2fr 1fr;
            gap: 40px;
            align-items: center;
        }
        .submit-btn {
            width: 100%;
            padding: 14px;
            border: none;
            border-radius: 8px;
            background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
            color: white;
            font-weight: bold;
            font-size: 1rem;
            cursor: pointer;
            transition: var(--transition-bounce);
            box-shadow: var(--shadow-sm);
            text-align: center;
            text-decoration: none;
            display: block;
        }
        .submit-btn:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-md);
        }

        /* Form styling for Direct Message Portal */
        .form-group {
            margin-bottom: 22px;
            text-align: right;
        }
        .form-group label {
            display: block;
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--dynamic-text);
            letter-spacing: 0.3px;
        }
        .form-control {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid var(--dynamic-border);
            background: var(--dynamic-bg);
            color: var(--dynamic-text);
            border-radius: 8px;
            outline: none;
            font-size: 0.9rem;
            transition: var(--transition-smooth);
        }
        .form-control:focus {
            border-color: var(--secondary-blue);
            box-shadow: 0 0 0 3px rgba(22, 138, 173, 0.15);
        }
        .textarea-control {
            resize: vertical;
            min-height: 120px;
        }

        /* Parent Feedback/Objection Container */
        .feedback-container {
            max-width: 800px;
            margin: 0 auto;
        }

        /* Admission Section Layout */
        .admission-section {
            background: linear-gradient(135deg, rgba(15, 48, 87, 0.05), rgba(22, 138, 173, 0.05));
            border-top: 1px solid var(--dynamic-border);
            border-bottom: 1px solid var(--dynamic-border);
            padding: 80px 0;
        }
        .admission-box {
            display: grid;
            grid-template-columns: 1.2fr 1fr;
            gap: 40px;
            align-items: center;
        }

        /* Careers Section */
        .careers-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            align-items: flex-start;
        }
        .job-card {
            margin-bottom: 20px;
            position: relative;
        }
        .job-card h4 {
            color: var(--primary-blue);
            font-size: 1rem;
            margin-bottom: 8px;
        }
        body.dark-theme .job-card h4 {
            color: var(--gold);
        }
        .job-meta {
            display: flex;
            gap: 15px;
            font-size: 0.75rem;
            color: var(--dynamic-text-muted);
            margin-bottom: 12px;
        }
        .job-meta span {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        /* Gallery Filters and Zoom Hover Styles */
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
        }
        .gallery-item {
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            aspect-ratio: 4/3;
            box-shadow: var(--shadow-sm);
            cursor: pointer;
        }
        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition-smooth);
        }
        .gallery-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 48, 87, 0.85);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: var(--transition-smooth);
            padding: 20px;
            box-sizing: border-box;
            color: white;
            text-align: center;
        }
        .gallery-item:hover img {
            transform: scale(1.08);
        }
        .gallery-item:hover .gallery-overlay {
            opacity: 1;
        }
        .gallery-overlay h5 {
            font-family: 'Cinzel', 'Noto Nastaliq Urdu', serif;
            font-size: 1rem;
            margin-bottom: 5px;
            color: var(--gold);
        }
        .gallery-overlay p {
            font-size: 0.75rem;
        }

        /* Testimonials Styles */
        .testimonials-wrapper {
            position: relative;
            max-width: 800px;
            margin: 0 auto;
            overflow: hidden;
        }
        .testimonial-slider {
            display: flex;
            transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .testimonial-slide {
            min-width: 100%;
            box-sizing: border-box;
            text-align: center;
            padding: 40px;
        }
        .testimonial-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            margin: 0 auto 20px auto;
            border: 3px solid var(--gold);
            overflow: hidden;
            background: rgba(15, 48, 87, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .testimonial-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .stars {
            color: var(--gold);
            margin-bottom: 15px;
            font-size: 0.85rem;
        }
        .testimonial-text {
            font-size: 1rem;
            font-style: italic;
            color: var(--dynamic-text);
            margin-bottom: 20px;
            line-height: 1.8;
        }
        .testimonial-author {
            font-weight: 600;
            color: var(--primary-blue);
            font-size: 0.9rem;
        }
        body.dark-theme .testimonial-author {
            color: white;
        }
        .testimonial-role {
            font-size: 0.75rem;
            color: var(--dynamic-text-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .slider-dots {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 20px;
        }
        .slider-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--dynamic-border);
            cursor: pointer;
            transition: var(--transition-smooth);
        }
        .slider-dot.active {
            background: var(--gold);
            transform: scale(1.2);
        }

        /* FAQ Accordion */
        .faq-wrapper {
            max-width: 800px;
            margin: 0 auto;
        }
        .faq-item {
            background: var(--dynamic-card-bg);
            border: 1px solid var(--dynamic-border);
            border-radius: 8px;
            margin-bottom: 15px;
            overflow: hidden;
            transition: var(--transition-smooth);
        }
        .faq-header {
            padding: 20px 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            font-weight: 600;
            color: var(--primary-blue);
            transition: var(--transition-smooth);
            font-size: 0.95rem;
        }
        body.dark-theme .faq-header {
            color: white;
        }
        .faq-header i {
            transition: var(--transition-smooth);
        }
        .faq-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            padding: 0 25px;
            color: var(--dynamic-text-muted);
            font-size: 0.85rem;
        }
        .faq-item.open .faq-content {
            max-height: 1000px;
            padding: 0 25px 20px 25px;
            transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .faq-item.open .faq-header i {
            transform: rotate(180deg);
            color: var(--gold);
        }

        /* Contact Section Details */
        .contact-grid {
            display: grid;
            grid-template-columns: 1fr 1.5fr;
            gap: 40px;
            align-items: flex-start;
        }
        .contact-info-panel {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }
        .info-item {
            display: flex;
            gap: 15px;
            align-items: flex-start;
        }
        .info-icon {
            background: rgba(15, 48, 87, 0.05);
            color: var(--secondary-blue);
            width: 45px;
            height: 45px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            flex-shrink: 0;
        }
        body.dark-theme .info-icon {
            background: rgba(255, 255, 255, 0.05);
            color: var(--gold);
        }
        .info-details h5 {
            font-size: 0.95rem;
            color: var(--primary-blue);
            margin-bottom: 3px;
            font-family: 'Poppins', 'Noto Nastaliq Urdu', sans-serif;
            font-weight: 600;
        }
        body.dark-theme .info-details h5 {
            color: white;
        }
        .info-details p {
            font-size: 0.85rem;
            color: var(--dynamic-text-muted);
        }
        .map-wrapper {
            border-radius: 12px;
            overflow: hidden;
            height: 250px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--dynamic-border);
        }
        .map-wrapper iframe {
            width: 100%;
            height: 100%;
            border: none;
        }

        /* Notification Toast */
        .notification-toast {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: var(--primary-blue);
            color: white;
            border-right: 5px solid var(--gold);
            padding: 15px 25px;
            border-radius: 4px;
            box-shadow: var(--shadow-lg);
            z-index: 1000;
            display: flex;
            align-items: center;
            gap: 15px;
            transform: translateY(150%);
            transition: var(--transition-smooth);
        }
        .notification-toast.show {
            transform: translateY(0);
        }

        /* Footer Layout */
        .footer {
            background: #081a30;
            color: #e2e8f0;
            padding: 80px 0 30px 0;
            font-size: 0.85rem;
            border-top: 4px solid var(--gold);
        }
        .footer-grid {
            display: grid;
            grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
            gap: 40px;
            margin-bottom: 50px;
        }
        .footer-logo h2 {
            font-size: 1.3rem;
            color: white;
            margin-bottom: 15px;
        }
        .footer-logo p {
            color: #94a3b8;
            margin-bottom: 25px;
            line-height: 1.6;
        }
        .footer-social-links {
            display: flex;
            gap: 12px;
        }
        .footer-social-links a {
            background: rgba(255, 255, 255, 0.05);
            color: white;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition-smooth);
        }
        .footer-social-links a:hover {
            background: var(--gold);
            color: var(--primary-blue);
            transform: translateY(-3px);
        }
        .footer-links-col h4 {
            font-size: 1.05rem;
            color: white;
            margin-bottom: 20px;
            position: relative;
            padding-bottom: 8px;
        }
        .footer-links-col h4::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 35px;
            height: 2px;
            background: var(--gold);
        }
        .footer-links-col ul {
            list-style: none;
        }
        .footer-links-col ul li {
            margin-bottom: 12px;
        }
        .footer-links-col ul li a {
            color: #94a3b8;
            text-decoration: none;
            transition: var(--transition-smooth);
        }
        .footer-links-col ul li a:hover {
            color: white;
            padding-right: 5px;
        }
        .footer-newsletter p {
            color: #94a3b8;
            margin-bottom: 20px;
        }
        .newsletter-form {
            display: flex;
            gap: 8px;
        }
        .newsletter-input {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: white;
            padding: 10px 15px;
            border-radius: 4px;
            flex-grow: 1;
            outline: none;
            font-size: 0.8rem;
        }
        .newsletter-btn {
            background: var(--gold);
            color: var(--primary-blue);
            border: none;
            padding: 10px 15px;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 600;
            transition: var(--transition-smooth);
        }
        .newsletter-btn:hover {
            background: var(--gold-hover);
            color: white;
        }
        .footer-bottom {
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            padding-top: 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
            color: #94a3b8;
        }

        /* Scroll To Top Button */
        .scroll-top-btn {
            position: fixed;
            bottom: 30px;
            left: 30px;
            background: var(--gold);
            color: var(--primary-blue);
            width: 45px;
            height: 45px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: var(--shadow-md);
            opacity: 0;
            visibility: hidden;
            transition: var(--transition-bounce);
            z-index: 99;
            border: none;
        }
        .scroll-top-btn.show {
            opacity: 1;
            visibility: visible;
        }
        .scroll-top-btn:hover {
            background: var(--primary-blue);
            color: white;
            transform: translateY(-5px);
        }

        /* Mobile specific viewport overrides and input scale adjustment */
        @media (max-width: 1024px) {
            .stats-wrapper {
                grid-template-columns: repeat(2, 1fr);
                bottom: -100px;
            }
            .hero {
                padding-bottom: 150px;
                min-height: auto;
            }
            #about {
                padding-top: 140px;
            }
            .about-grid, .principal-grid, .results-container, .fee-grid, .careers-container, .contact-grid, .admission-box {
                grid-template-columns: 1fr;
            }
            .teachers-grid, .features-grid, .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .toppers-grid {
                grid-template-columns: 1fr;
            }
            .footer-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            input, select, textarea, .form-control, .search-input, .newsletter-input {
                font-size: 16px !important; /* Disables standard iOS Safari auto-zooming on focus */
            }
            .navbar {
                padding: 15px 20px;
            }
            .menu-btn {
                display: flex; /* Mobile view shows the Menu icon */
            }
            .nav-links {
                position: fixed;
                top: 75px;
                left: -100%;
                width: 100%;
                height: calc(100vh - 75px);
                background: var(--dynamic-card-bg);
                backdrop-filter: var(--glass-blur);
                -webkit-backdrop-filter: var(--glass-blur);
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 30px;
                transition: var(--transition-smooth);
                box-shadow: var(--shadow-md);
            }
            .nav-links.active {
                left: 0;
            }
            .hero {
                min-height: auto;
                padding-top: 60px;
                padding-bottom: 180px;
            }
            .hero h2 {
                font-size: 1.8rem;
            }
            .hero p {
                font-size: 0.95rem;
                margin-bottom: 25px;
            }
            .stats-wrapper {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
                bottom: -150px;
                left: 15px;
                right: 15px;
            }
            .stat-card {
                padding: 15px;
            }
            .stat-num {
                font-size: 1.6rem;
            }
            #about {
                padding-top: 180px;
            }
            .teachers-grid, .features-grid, .gallery-grid {
                grid-template-columns: 1fr;
            }
            .footer-grid {
                grid-template-columns: 1fr;
            }
            .toppers-grid {
                grid-template-columns: 1fr;
            }
            
            /* Responsive table wrapper container adjustments */
            .search-results-box {
                padding: 15px;
            }
            .search-header-inner {
                flex-direction: column;
                gap: 10px;
            }
            .search-btn {
                width: 100%;
                justify-content: center;
            }

            /* Responsive Footer Newsletter form adjustments */
            .newsletter-form {
                flex-direction: column;
                gap: 10px;
                width: 100%;
            }
            .newsletter-input, .newsletter-btn {
                width: 100%;
                text-align: center;
            }
        }
        
        @media (max-width: 480px) {
            .container {
                width: 94%; /* Allocates extra layout space on extra small viewports */
                padding: 40px 0;
            }
        }
    